import Head from "../../components/header";
import { Layout, Menu } from 'antd';
import { CopyOutlined } from '@ant-design/icons';
import './index.less';
import { Redirect, Link, Route } from 'react-router-dom';
import SetOrder from './setOrder';
import ListOrder from './listOrder';
import Details from './details';
const { SubMenu } = Menu;
const { Sider } = Layout;
function OrderManege() {
    return (<div className='zindex'>
        <Layout>
            <Head />
            <Layout>
                <Sider width={200}>
                    <Menu
                        mode="inline"
                        theme="dark"
                        selectable="true"
                        defaultSelectedKeys={['1']}
                        defaultOpenKeys={['sub1']}
                        style={{ height: '100%', borderRight: 0 }}>
                        <SubMenu key="sub1" icon={<CopyOutlined />} title="订单管理">
                            <Menu.Item key="1">
                                <Link to='/home/orderManege/listOrder'>订单列表</Link>
                                </Menu.Item>
                            <Menu.Item key="2">
                                <Link to='/home/orderManege/setOrder'>订单设置</Link>
                                </Menu.Item>
                        </SubMenu>
                    </Menu>
                </Sider>
                
                <Route path='/home/orderManege/listOrder'><ListOrder /></Route>
                <Route path='/home/orderManege/details'><Details /></Route>
                <Route path='/home/orderManege/setOrder'><SetOrder /></Route>
                <Redirect to="/home/orderManege/details" /> 
            </Layout> 
        </Layout>
    </div>)
}
export default OrderManege;